﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;

namespace Pokusaj1
{
    public class myClass:Idigitron
    {


     public Boolean Trougao(int a, int b, int c)
        {

            if ((a - b - c == 0) || (a + b <= c) || (c + b <= a) || (a + c <= b)  ) return false;
             
         return true;

        }

     public int[] Fibonaci(int x)
     {

         int[] f = new int[x];

         f[0] = 0;
         f[1] = 1;
         for (int i = 0; i < x; i++)
         {
             if (i == 0) f[i]=0;
             
              else if (i == 1) f[i] = 1;
             else  f[i] = f[i - 2] + f[i - 1];
          }
         return f;
      }

       public List<int> FibonaciLista(int x)
       {
        List<int> list = new List<int>();
       
       if (x==0)  throw new NotImplementedException();
    
       int i = 1;
       int br = 1;
       list.Add(0);
       list.Add(1);
       while (br+list[i-1] <= x)
        {
            br = list[i] + list[i - 1];
            list.Add(br);
            ++i;
        }
       return list;

      }
       
        public Boolean ProstBroj(int a)
       {

           if (a == 0) return false;
           if (a == 1 && a == 2) return true;
           else if (a > 2 && a % 2 == 0) return false;
           else if (a > 3 && a % 3 == 0) return false;
           else if (a > 5 && a % 5 == 0) return false;
           else if (a > 7 && a % 7 == 0) return false;
           else if (a > 9 && a % 9 == 0) return false;
           else if (a > 11 && a % 11 == 0) return false;
           else return true;
           //  throw new Exception();
           
       }


    }
}